package practice.sort.compare;

import practice.sort.Sort;

/**
 * @Description:
 * @Author Ammar
 * @Create 2023/8/9 19:46
 */
public class BubbleSort extends Sort {
    @Override
    public void sort() {
        for (int i = nums.length - 1; i >= 1; i--) {
            for (int j = 0; j < i; j++) {
                if (nums[j] > nums[j + 1]) swap(j, j + 1);
            }
        }
    }
}
